package com.zbkj.crmeb.front.service;

import java.util.List;

import com.zbkj.crmeb.chant.dto.ChannelMerchantDTO;
import com.zbkj.crmeb.chant.model.ChannelMerchant;
import org.springframework.web.multipart.MultipartFile;

import com.common.CommonPage;
import com.common.PageParamRequest;
import com.github.pagehelper.PageInfo;
import com.zbkj.crmeb.category.vo.CategoryTreeVo;
import com.zbkj.crmeb.front.request.IndexStoreProductSearchRequest;
import com.zbkj.crmeb.front.request.ProductRequest;
import com.zbkj.crmeb.front.response.ProductDetailResponse;
import com.zbkj.crmeb.front.response.ProductResponse;
import com.zbkj.crmeb.front.response.StoreProductReplayCountResponse;
import com.zbkj.crmeb.store.model.StoreProduct;
import com.zbkj.crmeb.store.response.StoreProductReplyResponse;
import com.zbkj.crmeb.store.response.StoreProductResponse;

/**
* @author Mr.Zhang
* @Description IndexService 接口
* @since 2020-04-13
*/
public interface ProductService  {
    CommonPage<ProductResponse> getIndexProduct(IndexStoreProductSearchRequest request, PageParamRequest pageParamRequest);

    List<CategoryTreeVo> getCategory();

    CommonPage<ProductResponse> getList(ProductRequest request, PageParamRequest pageParamRequest) throws Exception;

    CommonPage<ProductResponse> getListByTuSou(MultipartFile targetImage, ProductRequest request, PageParamRequest pageParamRequest) throws Exception;

    ProductDetailResponse getDetail(Integer id);

    PageInfo<StoreProductReplyResponse> getReplyList(Integer id, Integer type, PageParamRequest pageParamRequest);

    StoreProductReplayCountResponse getReplyCount(Integer id);

    String getPacketPriceRange(StoreProductResponse storeProductResponse,boolean isPromoter);

    Integer getStockCount(Integer productId, String sourceSkuId, String size);

    Integer getStockCountUnpaid(List<Integer> productIds, List<Integer> activityGroupIds);

    void updateProductByNow(StoreProduct storeProduct);

    /**
     * 
     * @author cyz
     * @date 2021/4/9 11:31
 * @param request
 * @param pageParamRequest
 * @return com.common.CommonPage
     */
    CommonPage selectZoneProductList(ProductRequest request, PageParamRequest pageParamRequest);
    
    /**
     * 统计标准商品所绑定的供应商商品数量
     * @Description:  
     * @author daigb 
     * @param 
     * @return void
     * @throws
     */
    void calcProductSuppliersCount();
    
    /**
     * 删除未绑定属性商品
     * @Description:  
     * @author daigb 
     * @param 
     * @return void
     * @throws
     */
    void delProductException();
    
    /**
     * 商户商品自动下架
     * @Description:  
     * @author daigb 
     * @param 
     * @return void
     * @throws
     */
    void autoDownProductTask(Integer merId);

    void removeDownProduct(ChannelMerchant channelMerchant);

    /**
     * 商户商品自动上架
     * @Description:  
     * @author daigb 
     * @param 
     * @return void
     * @throws
     */
    void autoUpOrDownProductTask(Integer merId, Boolean isShow);

    /**
     * 批量更新商户商品数据
     * @param entity
     * @param channelMerchant
     */
    void batchRenewalMerTask(ChannelMerchantDTO entity, ChannelMerchant channelMerchant);
    
}